package top.wardyan.base.datasource;

import com.jfinal.plugin.activerecord.dialect.Dialect;
import com.jfinal.plugin.activerecord.dialect.SqlServerDialect;

public abstract class BaseSQLiteDatasource extends AbstractDatasource{
	
	protected static final Dialect dialect = new SqlServerDialect();

	/** 构造函数 简单地抛出 **/
	protected BaseSQLiteDatasource(String	address,
									   Integer	port,
									   String	dbName,
									   String	user,
									   String	password,
									   String	arpName) throws RuntimeException {
		super(address, port, dbName, user, password, arpName);
	}

	@Override
	protected final String setDriver() {
		return "com.microsoft.sqlserver.jdbc.SQLServerDriver";
	}

	@Override
	protected final Dialect setDialect() {
		return dialect;
	}

	@Override
	protected final String setJDBCUrl() {
		return "jdbc:sqlserver://{localhost}:{port}; DatabaseName = {databasename}";
	}

}
